package top.yxqz.req;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author Mr.余
 * @date 2022/11/21
 * @package top.yxqz.req
 * 请求转发
 */
@WebServlet("/demo4")
public class ReqDemo4 extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        RequestDispatcher requestDispatcher = request.getRequestDispatcher("/ForwardServlet");
        requestDispatcher.forward(request,response);
    }
}
